<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/pages/safeai/jsp/common/taglibs.jsp"%>
<%@ page isELIgnored="false"%>
<html>
	<head>
		<title>前台管理--评论管理</title>
		<script type="text/javascript" src="${ctx}/script/common/common.js"></script>
		<script language="javascript" type="text/javascript"
			src="${ctx}/script/Date/WdatePicker.js"></script>
		<%@ include file="/pages/safeai/jsp/common/meta.jsp"%>
		<link href="${ctx}/css/safeai/together.css" rel="stylesheet"
			type="text/css">
	</head>

	<body>
<input type="hidden" id="ctx" value="${ctx}">
		<html:form action="/others/evaluateManage" method="post">
		<div style="padding:7px 0px 7px 10px">
			<input type="hidden" name="method" value="listToday" />
			起始日期：
			<input class="Wdate" id="startDate" name="startDate" type="text"
							onfocus="new WdatePicker()"
							maxdate="#F{$('endDate').value}" value="${startDate}"
							onpicked="$('endDate').onfocus()" readonly="readonly" />&nbsp;&nbsp;&nbsp;
			结束日期：
			<input class="Wdate" id="endDate" name="endDate" type="text"
							onfocus="new WdatePicker()"
							MINDATE="#F{$('startDate').value}" value="${endDate}"
							readonly="readonly" />
						
						<input type="submit" class="btn" value="查询" /><br />
			产品评论列表 - ${startDate} -- ${endDate} 的评论 
	</div>
		<table width="98%">
				<tr>
					<th class="td_01" height="25px">
						标题
					</th>
					<th class="td_01">
						内容
					</th>
					<th class="td_01">
						评论产品
					</th>
					<th class="td_01">
						评分
					</th>
					<th class="td_01">
						发布日期
					</th>
					<th class="td_01">
						作者昵称
					</th>
					<th class="td_01">
						操作
					</th>
				</tr>
				<logic:present name="EvaluateRange">
					<logic:iterate id="evaluate" name="EvaluateRange"
						property="records">
						<tr>
							<input type="hidden" name="evaluate.del" />
							<td class="td_03">
								${evaluate.title}
							</td>
							<td class="td_03">
								${evaluate.content}
							</td>
							<td class="td_03">
								${evaluate.name}
							</td>
							<!-- 评分 -->
							<td class="td_03" nowrap>
								<bean:define id="count" name="evaluate" property="score"
									type="java.lang.Integer" />
								<%
									for (int i = 0; i < count.intValue(); i++) {
								%>
								<img src='${ctx}/images/star.gif' />
								<%
									}
								%>
							</td>
							<td class="td_03">
								${evaluate.publishDate}
							</td>
							<td class="td_03">
								${evaluate.nicky}
							</td>
							<td class="td_03">
								<a href="#"
									onmousedown="javascript:deletelack(${evaluate.id})">删除</a>
							</td>
						</tr>
					</logic:iterate>
				</logic:present>
				<tr>
					<td colspan="7" align="right">
						<%@ include file="/pages/safeai/jsp/common/page.jsp"%>&nbsp;&nbsp;&nbsp;&nbsp;
					</td>
				</tr>
			</table>
		</html:form>
	</body>
	<script type="text/javascript">
var ctxvalue="";
window.onload=function(){
   var ctx=document.getElementById("ctx");
   ctxvalue=ctx.value+"";
}
function deletelack(id){
    var startDate=document.getElementById("startDate");
    var endDate=document.getElementById("endDate");
    if(confirm('是否删除？')==true){
        location.href=ctxvalue+"/others/evaluateManage.do?method=delete&evaluate.id="+id+"&startDate="+startDate.value+"&endDate="+endDate.value;
    }
}

</script>
</html>